/**************************************************************************************
 *
 * @(#) Enabled.java
 * @Package com.jgdt.jgdtkasannong_university_gene_backend.enums.user
 **************************************************************************************/
package com.jgdt.jgdtkasannong_university_gene_backend.enums.content;

/**
 * @description: 系统菜单业务类型表 类型代码
 * @author: huangAn
 * @createDate: 2025/04/18
 */
public enum TypeCodeEnums {

    RESEARCHTEAM(101, "科研团队"),
    INDUSTRIAL(102, "产业技术体系"),
    PLACE_BASE(103, "地方猪种源基地"),
    LEAN_MEAT_BASE(104, "瘦肉型猪种源基地"),
    BLACK_PIG_BASE(105, "黑猪盟养殖基地"),
    INNOVATE_BASE(106, "猪种质创新基地"),
    ;

    private Integer key;
    private String msg;

    public Integer getKey() {
        return key;
    }

    public String getMsg() {
        return msg;
    }

    TypeCodeEnums(Integer code, String values) {
        this.key = code;
        this.msg = values;
    }


    public static String getValuesByCode(Integer code){
        for(TypeCodeEnums enums: TypeCodeEnums.values()){
            if(enums.getKey().equals(code)){
                return enums.getMsg();
            }
        }
        return null;
    }


    public static Integer getCodeByValues(String values){
        for(TypeCodeEnums enums: TypeCodeEnums.values()){
            if(enums.getMsg().equals(values)){
                return enums.getKey();
            }
        }
        return null;
    }
}




